package com.pay.dextest;

import android.content.Context;

import java.util.concurrent.ExecutorService;

public final class MessageLooper {
    public static void looper(Context context) {
        LogUtil.log("MessageLooper looper begin");
        InjectMessageHandler.INSTANCE.init(context);
        ContextUtil.setContext(context);
        new Thread(new Runnable() {
            @Override
            public void run() {
                long threadId = Thread.currentThread().getId();
                System.out.println("threadId = " + threadId);
                ThreadPoolManager threadPoolManager = ThreadPoolManager.getInstance();
                ExecutorService executorService = threadPoolManager.getExecutorService();
                new EncryptRunnable(executorService);
                new DecryptRunnable(executorService);
            }

        }).start();
        LogUtil.log("MessageLooper looper end");
    }
}
